package com.itheima.a01oppextendsdemo1;

public class Test {
    public static void main(String[] args) {
        //创建对象并调用方法

        //1.创建布偶猫的对象
        Ragdoll r = new Ragdoll();
        r.eat();
        r.catchMouse();
        System.out.println("------------------");
        //2.创建哈士奇的对象
        Husky h = new Husky();
        h.eat();
        h.lookHome();
        h.breakHome();
        System.out.println("------------------");
        //3.创建泰迪的对象
        Teddy t = new Teddy();
        t.eat();
        t.lookHome();
        t.touch();
        System.out.println("------------------");
        //4.创建狸花猫的对象
        LiHua l = new LiHua();
        l.eat();
        l.catchMouse();
        System.out.println("------------------");
        //5.创建动物的对象
        Animal a = new Animal();
        a.eat();
    }
}
